var form;

$(function () {
    initLayUI();
});

function initLayUI() {
    layui.use(['form'], function () {
        form = layui.form;

        form.render();

        let operId = getTempData('detailOperId');

        if (operId !== undefined) {
            ajaxUtil.simpleGet("/operLog/queryDetail?operId=" + operId, function (data) {
                form.val('form', {
                    "moduleName": data.moduleName + " / " + data.operType,
                    "operAccount": data.operAccount + " / " + data.operIp + " / " + data.operLocation,
                    "operUrl": data.operUrl,
                    "requestMethod": data.requestMethod,
                    "method": data.method,
                    "isSuccess": data.isSuccess === true ? "成功" : "false",
                    "operParam": data.operParam,
                    "jsonResult": data.jsonResult,
                    "errorMsg": data.errorMsg
                });
                if (!data.isSuccess) {
                    $("#errorMsgDiv").show();
                }
            });
        }

        $("#cancelBtn").click(function () {
            layerUtil.closeLayer(parent.window.iframeIndex);
        });
    });
}